package com.erp.entity.goods;

import java.util.List;

/**
 * 单位组添加请求模型
 */
public class UnitGroupRequest {
    /**
     * 主键，自增
     */
    private Integer multipleUnitId;
    /**
     * 计量单位名称
     */
    private String multipleUnitName;
    /**
     * 父级ID，0 表示多单位最上级（主信息）
     */
    private Integer unitParentId;
    /**
     * 是否是基础单位，1 是基础单位，0 是普通副单位
     */
    private Integer unitIsBase;
    /**
     * 换算比例（当前单位对基础单位的换算比例）
     */
    private Integer multipleUnitRatio;
    /**
     * 公司ID
     */
    private Integer companyId;

    /**
     * 基础单位
     */
    private MultipleUnit multipleUnit;

    /**
     * 副单位列表
     */
    private List<MultipleUnit> list;


    public UnitGroupRequest() {
    }

    public UnitGroupRequest(MultipleUnit mainUnit, MultipleUnit baseUnit, List<MultipleUnit> subUnits) {
        this.multipleUnitId = mainUnit.getMultipleUnitId();
        this.multipleUnitName = mainUnit.getMultipleUnitName();
        this.unitParentId = mainUnit.getUnitParentId();
        this.unitIsBase = mainUnit.getUnitIsBase();
        this.multipleUnitRatio = mainUnit.getMultipleUnitRatio();
        this.companyId = mainUnit.getCompanyId();

        this.multipleUnit = baseUnit;
        this.list = subUnits;
    }

    public MultipleUnit getMultipleUnit() {
        return multipleUnit;
    }

    public void setMultipleUnit(MultipleUnit multipleUnit) {
        this.multipleUnit = multipleUnit;
    }

    public Integer getMultipleUnitId() {
        return multipleUnitId;
    }

    public void setMultipleUnitId(Integer multipleUnitId) {
        this.multipleUnitId = multipleUnitId;
    }

    public String getMultipleUnitName() {
        return multipleUnitName;
    }

    public void setMultipleUnitName(String multipleUnitName) {
        this.multipleUnitName = multipleUnitName;
    }

    public Integer getUnitParentId() {
        return unitParentId;
    }

    public void setUnitParentId(Integer unitParentId) {
        this.unitParentId = unitParentId;
    }

    public Integer getUnitIsBase() {
        return unitIsBase;
    }

    public void setUnitIsBase(Integer unitIsBase) {
        this.unitIsBase = unitIsBase;
    }

    public Integer getMultipleUnitRatio() {
        return multipleUnitRatio;
    }

    public void setMultipleUnitRatio(Integer multipleUnitRatio) {
        this.multipleUnitRatio = multipleUnitRatio;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public List<MultipleUnit> getList() {
        return list;
    }

    public void setList(List<MultipleUnit> list) {
        this.list = list;
    }
}